import request from '@/utils/request'

// 获取管理员列表接口
export function getAdminList(params: any) {
  return request({
    url: '/VueHandler/AdminHandler?action=show',
    method: 'get',
    params
  })
}
// 添加管理员接口
export const addAdminApi=(data:any)=>{
   return request({
    url: '/VueHandler/AdminLoginAndRegHandler?action=add',
    method: 'post',
    data
  })
}
// 编辑管理员接口
export const updateAdmin=(data:any)=>{
  return request({
    url: '/VueHandler/AdminHandler?action=update',
    method: 'post',
    data
  })
}
// 删除接口
export const toDelAdmin=(tokenId:any)=>{
    return request({
    url: '/VueHandler/AdminHandler?action=delete',
    method: 'get',
    params:{
      tokenId:tokenId
    }
  })
}